{/* Copyright 2020 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License. */}

import {Layout} from '@react-spectrum/docs';
export default Layout;

import docs from 'docs:@react-stately/selection';
import listDocs from 'docs:@react-stately/list';
import selectDocs from 'docs:@react-stately/select';
import {HeaderInfo, ClassAPI, FunctionAPI, TypeContext, InterfaceType, TypeLink, PageDescription} from '@react-spectrum/docs';
import packageData from '@react-stately/selection/package.json';

```jsx import
import '@react-spectrum/docs/src/client';
```

---
category: Selection
keywords: [multiple selection, state]
---

# useMultipleSelectionState

<PageDescription>{docs.exports.useMultipleSelectionState.description}</PageDescription>

<HeaderInfo
  packageData={packageData}
  componentNames={['useMultipleSelectionState']} />

## Introduction

`useMultipleSelectionState` manages selection state for many components. Oftentimes, you won't
need to use this hook directly, since it's included in hooks
like <TypeLink links={listDocs.links} type={listDocs.exports.useListState} />,
and <TypeLink links={selectDocs.links} type={selectDocs.exports.useSelectState} />.
These expose a <TypeLink links={docs.links} type={docs.exports.SelectionManager} />, which provides a higher level way
to manipulate selection state.

## API

<FunctionAPI links={docs.links} function={docs.exports.useMultipleSelectionState} />

## Interface

<ClassAPI links={docs.links} class={docs.links[docs.exports.useMultipleSelectionState.return.id]} />
